class UserOapenidToken < ActiveRecord::Base
  attr_accessible :op_token, :user_id
  
  
  def self.getOpinfo(user_id, op_token)
    token = ""
    cutoken = self.find_by_user_id(user_id)
    unless cutoken.blank?
      token = cutoken.op_token
    else
     cutoken = self.create!(:user_id => user_id, :op_token => op_token)
     token = cutoken.op_token
    end
    token
  end
end
